package com.demo.hxs.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.demo.hxs.entity.OrderEntity;
import com.demo.hxs.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shishaopeng
 */
@RestController
@RequestMapping("/web/order")
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/list")
    public List<OrderEntity> list() {
        Page<OrderEntity> page = orderService.page(new Page<>(1, 500));
        return page.getRecords();
    }

}
